home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TextObjectImaging.h
-
- Contains: Text object Imaging Interfaces.
-
- Version: Technology: System 8
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __TEXTOBJECTIMAGING__
- #define __TEXTOBJECTIMAGING__
-
- #ifndef __CONDITIONALMACROS__
- #include <ConditionalMacros.h>
- #endif
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __TEXTOBJECTS__
- #include <TextObjects.h>
- #endif
- #ifndef __QUICKDRAW__
- #include <Quickdraw.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- #if FOR_SYSTEM7_AND_SYSTEM8_COOPERATIVE
- /* An alias for OptionBits to make the intended usage in the prototypes easier to understand */
- typedef OptionBits TextObjectImagingOptions;
- /* Global direction choices */
- typedef UInt8 TextObjectDirection;
-
- enum {
- kTextObjSysDirection = 0,
- kTextObjLeftToRight = 1,
- kTextObjRightToLeft = 2
- };
-
- /* Imaging option bits */
-
- enum {
- kTextObjAlignmentOptionBits = 0,
- kTextObjJustifyBit = 2,
- kTextObjCondenseBit = 3,
- kTextObjElisionBits = 4
- };
-
- /* Alignment options */
-
- enum {
- kTextObjAlignWithDirectionOpt = 0 << kTextObjAlignmentOptionBits,
- kTextObjAlignLeftOpt = 1 << kTextObjAlignmentOptionBits,
- kTextObjAlignRightOpt = 2 << kTextObjAlignmentOptionBits,
- kTextObjAlignCenterOpt = 3 << kTextObjAlignmentOptionBits
- };
-
- /* Justification options */
-
- enum {
- kTextObjDontJustifyOpt = 0 << kTextObjJustifyBit,
- kTextObjJustifyOpt = 1 << kTextObjJustifyBit
- };
-
- /* Condensed font options */
-
- enum {
- kTextObjTryCondenseOpt = 0 << kTextObjCondenseBit,
- kTextObjDontCondenseOpt = 1 << kTextObjCondenseBit
- };
-
- /* Elision options */
-
- enum {
- kTextObjElideMiddleOpt = 0 << kTextObjElisionBits,
- kTextObjElideEndOpt = 1 << kTextObjElisionBits,
- kTextObjElideBeginningOpt = 2 << kTextObjElisionBits,
- kTextObjDontElideOpt = 3 << kTextObjElisionBits
- };
-
- extern OSStatus DrawTextObject(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, CGrafPtr grafPort, TextObjectDirection direction, TextObjectImagingOptions options);
-
- extern OSStatus ComputeTextObjectBounds(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, CGrafPtr grafPort, TextObjectDirection direction, TextObjectImagingOptions fontSubstitutionHint, Fixed *width, Fixed *lineHeight, Fixed *ascent);
-
- extern OSStatus FlowTextObjectOntoLine(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, CGrafPtr grafPort, Fixed availableWidth, TextObjectDirection direction, TextObjectImagingOptions alignAndFitOptions, Fixed *actualWidth);
-
- extern OSStatus FlowTextObjectIntoBox(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, CGrafPtr grafPort, const Rect *box, TextObjectDirection direction, TextObjectImagingOptions alignAndJustOptions, Fixed *actualExtent, Fixed *lineHeight, TextObjectIndex *clipIndex);
-
- extern OSStatus ComputeTextObjectBoxExtent(ConstTextObject textObject, TextObjectIndex startIndex, TextObjectIndex endIndex, CGrafPtr grafPort, const Rect *box, TextObjectDirection direction, TextObjectImagingOptions alignAndJustOptions, Fixed *actualExtent, Fixed *lineHeight, TextObjectIndex *clipIndex);
-
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __TEXTOBJECTIMAGING__ */
-
-